<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>m4.include/ax_path_lib_pcre.m4</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.5.7' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<!-- beginning of fixed guide -->
<div id='guide'><ul>
<li><a href='#TOP'><img class='icon' src='../icons/first.png' alt='[^]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/last.png' alt='[v]' /></a></li>
<li><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a></li>
<li><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a></li>
<li><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a></li>
<li class='standout'><span><a href='../files/m4.include.html'>m4.include</a>/ax_path_lib_pcre.m4</span></li>
</ul></div>
<!-- end of fixed guide -->
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/m4.include.html'>m4.include</a>/ax_path_lib_pcre.m4</h2>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><img class='icon' src='../icons/n_top.png' alt='[top]' /><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+1 m4.include/ax_path_lib_pcre.m4'  /> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a>dnl @synopsis AX_PATH_LIB_PCRE [(A/NA)]
<a id='L2' name='L2'></a>dnl
<a id='L3' name='L3'></a>dnl check for pcre lib and set PCRE_LIBS and PCRE_CPPFLAGS accordingly.
<a id='L4' name='L4'></a>dnl
<a id='L5' name='L5'></a>dnl also provide --with-pcre option that may point to the $prefix of
<a id='L6' name='L6'></a>dnl the pcre installation - the macro will check $pcre/include and
<a id='L7' name='L7'></a>dnl $pcre/lib to contain the necessary files.
<a id='L8' name='L8'></a>dnl
<a id='L9' name='L9'></a>dnl the usual two ACTION-IF-FOUND / ACTION-IF-NOT-FOUND are supported
<a id='L10' name='L10'></a>dnl and they can take advantage of the LIBS/CFLAGS additions.
<a id='L11' name='L11'></a>dnl
<a id='L12' name='L12'></a>dnl @author Guido U. Draheim &lt;guidod@gmx.de&gt;
<a id='L13' name='L13'></a>dnl @author Slava Zanko &lt;slavazanko@gmail.com&gt;
<a id='L14' name='L14'></a>dnl @version 2009-07-06
<a id='L15' name='L15'></a>dnl @license GPLWithACException
<a id='L16' name='L16'></a> 
<a id='L17' name='L17'></a>AC_DEFUN([AX_PATH_LIB_PCRE],[dnl
<a id='L18' name='L18'></a>AC_MSG_CHECKING([lib pcre])
<a id='L19' name='L19'></a>AC_ARG_WITH([pcre],
<a id='L20' name='L20'></a>            AS_HELP_STRING([--with-pcre@&lt;:@=prefix@:&gt;@], [Compile pcre part (via libpcre check)]),
<a id='L21' name='L21'></a>            ,
<a id='L22' name='L22'></a>            [with_pcre="yes"]
<a id='L23' name='L23'></a>)
<a id='L24' name='L24'></a>if test x"$with_pcre" = "xno" ; then
<a id='L25' name='L25'></a>  AC_MSG_RESULT([disabled])
<a id='L26' name='L26'></a>  m4_ifval($2,$2)
<a id='L27' name='L27'></a>else
<a id='L28' name='L28'></a> 
<a id='L29' name='L29'></a>  AC_MSG_RESULT([(testing)])
<a id='L30' name='L30'></a> 
<a id='L31' name='L31'></a>  if test "x$with_pcre" = "xyes" ; then
<a id='L32' name='L32'></a>    PCRE_CPPFLAGS="`pcre-config --cflags`"
<a id='L33' name='L33'></a>    PCRE_LIBS="`pcre-config --libs`"
<a id='L34' name='L34'></a>  else
<a id='L35' name='L35'></a>    test_PCRE_LIBS="-L$with_pcre/lib"
<a id='L36' name='L36'></a>    test_PCRE_CPPFLAGS="-I$with_pcre/include"
<a id='L37' name='L37'></a> 
<a id='L38' name='L38'></a>     OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS $test_PCRE_LIBS"
<a id='L39' name='L39'></a>     OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS $test_PCRE_CPPFLAGS"
<a id='L40' name='L40'></a> 
<a id='L41' name='L41'></a>     AC_CHECK_LIB(pcre, pcre_compile)
<a id='L42' name='L42'></a> 
<a id='L43' name='L43'></a>     if test x"$ac_cv_lib_pcre_pcre_compile" = x"yes" ; then
<a id='L44' name='L44'></a>        AC_MSG_RESULT(setting PCRE_LIBS -L$with_pcre/lib -lpcre)
<a id='L45' name='L45'></a> 
<a id='L46' name='L46'></a>        PCRE_LIBS=$test_PCRE_LIBS
<a id='L47' name='L47'></a>        PCRE_CPPFLAGS=$test_PCRE_CPPFLAGS
<a id='L48' name='L48'></a> 
<a id='L49' name='L49'></a>        AC_MSG_CHECKING([lib pcre])
<a id='L50' name='L50'></a>        AC_MSG_RESULT([$PCRE_LIBS])
<a id='L51' name='L51'></a>        m4_ifval($1,$1)
<a id='L52' name='L52'></a>     else
<a id='L53' name='L53'></a>        AC_MSG_CHECKING([lib pcre])
<a id='L54' name='L54'></a>        AC_MSG_RESULT([no, (WARNING)])
<a id='L55' name='L55'></a>        m4_ifval($2,$2)
<a id='L56' name='L56'></a>     fi
<a id='L57' name='L57'></a> 
<a id='L58' name='L58'></a>     CPPFLAGS="$OLDCFPPLAGS"
<a id='L59' name='L59'></a>     LDFLAGS="$OLDLDFLAGS"
<a id='L60' name='L60'></a> 
<a id='L61' name='L61'></a>  fi
<a id='L62' name='L62'></a>fi
<a id='L63' name='L63'></a> 
<a id='L64' name='L64'></a>AC_SUBST([PCRE_LIBS])
<a id='L65' name='L65'></a>AC_SUBST([PCRE_CPPFLAGS])
<a id='L66' name='L66'></a> 
<a id='L67' name='L67'></a>])
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><img class='icon' src='../icons/n_bottom.png' alt='[bottom]' /><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+67 m4.include/ax_path_lib_pcre.m4'  /> */</em>
</body>
</html>
